﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
    //var user = ViewBag.User as BuyWithoutLoseMoney.Core.Models.User;
}
@*@model List<BuyWithoutLoseMoney.Core.Models.User>;*@

<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>买不亏登录</title>
    <link rel="stylesheet" type="text/css" href="/css/styles.css">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    
    <style>
        .copyrights {
            text-indent: -9999px;
            height: 0;
            line-height: 0;
            font-size: 0;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div class="wrapper">

        <div class="container">
            <h1>Welcome</h1>
            <form class="layui-form form" action="">
                <div style="font-size:15px;">
                    <a href="/home/index" style="padding-right:20px">回到首页</a>
                    <a href="/login/register">注册</a>
                </div>
                <input type="text" name="name" placeholder="用户名">
                <input type="password" name="pwd" placeholder="密码">
                <button type="submit" id="login-button"  lay-submit="" lay-filter="loginForm">登录</button>
                <button type="reset" id="login-button">重置</button>
            </form>
        </div>

        <ul class="bg-bubbles">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>

    </div>

     <script>
        layui.use(["form", 'layer'], function () {
                var form = layui.form;
                var $ = layui.$;
                var layer = layui.layer;
                form.on('submit(loginForm)', function (data) {
                    $.post("/Login/Login", data.field, function (res) {
                        if (res.isSuccess) {
                            layer.msg(res.msg, function () {
                                window.location.href = "/Home/index/";
                            });
                        } else {
                            layer.msg(res.msg);
                        }
                    })
                    return false;
                });
            })
        </script>
</body>
</html>



@*<link rel="stylesheet" href="/css/Home.css">

<el-card class="box-card logincard" shadow="hover">
    <div slot="header" class="clearfix">
        <el-button style="float: left; padding: 3px 0" type="text">
            <a asp-controller="home" asp-action="index">返回 </a>
        </el-button>
        <span>登录页面</span>
        <el-button style="float: right; padding: 3px 0" type="text"><a asp-controller="login" asp-action="Register">注册</a></el-button>
    </div>
    <div>
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">登录名</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required lay-verify="required"
                           placeholder="请输入用户名/邮箱/电话" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="password" name="pwd" required lay-verify="required"
                           placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div>
                <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal"
                        style="width: 100px;" lay-submit="" lay-filter="loginForm">
                    确认
                </button>
                <button type="reset" class="layui-btn layui-btn-radius layui-btn-primary"
                        style="width: 100px;float: right;">
                    重置
                </button>
            </div>
        </form>
    </div>
</el-card>

@section Scripts{
    <script>
        layui.use(["form", 'layer'], function () {
                var form = layui.form;
                var $ = layui.$;
                var layer = layui.layer;
                form.on('submit(loginForm)', function (data) {
                    $.post("/Login/Login", data.field, function (res) {
                        if (res.isSuccess) {
                            layer.msg(res.msg, function () {
                                window.location.href = "/YongHuZhongXin/index";
                            });
                        } else {
                            layer.msg(res.msg);
                        }
                    })
                    return false;
                });
            })
        </script>
}*@